package com.hoshiicloud.saleorder.entity;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 退款单(RefundOrder)refund_order
 *
 * @author makejava
 * @since 2019-08-22 11:00:16
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("退款单实体")
public class RefundOrder extends Model<RefundOrder> {

    @ApiModelProperty("退款单ID")
    private Long id;

    @ApiModelProperty("处理店铺Id")
    private Long storeId;

    @ApiModelProperty("子订单ID")
    private Long subId;

    @ApiModelProperty("子订单编号")
    private String orderNo;

    @ApiModelProperty("主订单id")
    private Long mainId;

    @ApiModelProperty("主订单编号")
    private String mainNo;

    @ApiModelProperty("退款单编号")
    private String refundNo;

    @ApiModelProperty("商品标题")
    private String productTitle;

    @ApiModelProperty("商品图片")
    private String productImage;


    @ApiModelProperty("商品规格 json")
    private String productSpec;

    @ApiModelProperty("申请数量")
    private Long applyQtys;


    @ApiModelProperty("退款金额")
    private BigDecimal refundAmount;

    @ApiModelProperty("退还币数")
    private Long refundCoines;

    @ApiModelProperty("建立时间")
    private LocalDateTime createdTime;

    @ApiModelProperty("修改时间")
    private LocalDateTime updatedTime;

    @ApiModelProperty("建立人")
    private String createdBy;

    @ApiModelProperty("修改人")
    private String updatedBy;

    @ApiModelProperty(" 退款状态（1,等待商家处理),(2,等待买家发货)," +
            "(3,等待商家收货),(4,等待商家打款),(5,退款成功),6,商家拒绝退款),(7,退款已取消)")
    private Integer status;

    @ApiModelProperty("服务类型 1-仅退款 2-退货退款")
    private Integer serviceType;

    @ApiModelProperty("退款类型 1-售中 2-售后")
    private Integer refundType;

    @ApiModelProperty("买家ID,取member表Id")
    private Long userId;

    @ApiModelProperty("退款原因")
    private String reasons;

    @ApiModelProperty("备注")
    private String remark;

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
